﻿


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CommonTagTime.DataAccess;
using CommonTagTime.ModelObject;
namespace CommonTagTime.Business
{
    public class busStoreOrder
    {
        //------------------------------------------------
        //FIELD TABLE
        //------------------------------------------------

        public const string OrderId = "OrderId";
        public const string TrackingOrder = "TrackingOrder";
        public const string PurchaseOrder = "PurchaseOrder";
        public const string CustomerId = "CustomerId";
        public const string CreatedDate = "CreatedDate";
        public const string ModifiedDate = "ModifiedDate";
        public const string FinishDate = "FinishDate";
        public const string CreatedBy = "CreatedBy";
        public const string ModifiedBy = "ModifiedBy";

        public const string ORDERBY = "OrderBy";
        public const string ORDERDIRECTION = "OrderDirection";
        public const string CURRENTPAGE = "CurrentPage";
        public const string PAGESIZE = "PageSize";
        public const string TOTALRECORDS = "TotalRecords";
        public const string CONDITION = "Condition";


        private daoStoreOrder _daoOrder;
        //------------------------------------------------
        //PUBLIC
        //------------------------------------------------
        public busStoreOrder()
        {
            _daoOrder = new daoStoreOrder();
        }
        public string GenerateTrackingOrderCode()
        {
            return _daoOrder.GenerateTrackingOrderCode();
        }
        public int Insert(StoreOrder objOrder)
        {
            return _daoOrder.Insert(objOrder);
        }
        public int Update(StoreOrder objOrder)
        {
            return _daoOrder.Update(objOrder);
        }
        public bool Delete(int orderId)
        {
            return _daoOrder.Delete(orderId);
        }
        public StoreOrderCollection List(StoreOrder objOrder)
        {
            return _daoOrder.List(objOrder);
        }
        public StoreOrder GetByID(int orderId)
        {
            return _daoOrder.GetByID(orderId);
        }
    }

}